When gtk_window_set_titlebar is called, we need to set up
client-side decorations properly, and the easiest way to do
so is to realize the window again. Really, you should call
set_titlebar before the window is realized.
https://bugzilla.gnome.org/show_bug.cgi?id=722919
GtkWidget *widget = GTK_WIDGET (window);
GtkWindowPrivate *priv = window->priv;
GdkVisual *visual;
+ gboolean was_mapped;
g_return_if_fail (GTK_IS_WINDOW (window));
+ was_mapped = gtk_widget_get_mapped (widget);
+ if (gtk_widget_get_realized (widget))
+ gtk_widget_unrealize (widget);
+
unset_titlebar (window);
if (titlebar == NULL)
gtk_style_context_add_class (gtk_widget_get_style_context (titlebar),
GTK_STYLE_CLASS_TITLEBAR);
- gtk_widget_queue_resize (widget);
+ if (was_mapped)
+ gtk_widget_map (widget);
}
gboolean